package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: gpereir
 * Date: 5/21/13
 * Time: 11:35 AM
 * To change this template use File | Settings | File Templates.
 */
public class Database {
    private ArrayList<BookList> books = new ArrayList<BookList>();
    private ArrayList<MovieList> movies = new ArrayList<MovieList>();
    private ArrayList<UserList> users = new ArrayList<UserList>();


    public ArrayList<BookList> getBooks() {
        return books;
    }

    public ArrayList<MovieList> getMovies() {
        return movies;
    }

    public ArrayList<UserList> getUsers() {
        return users;
    }
    
    public void Bootstrap() {
        addBooks();
        addMovies();
        addUsers();
    }
    public void addBooks() {
//        if(Database.books.size() != 0)
//            return;

        BookList book1 = new BookList(1, "THE LIGHT BETWEEN OCEANS", "M. L. Stedman", true);
        BookList book2 = new BookList(2, "COOKED", "Michael Pollan", false);
        BookList book3 = new BookList(3, "THE BEST OF ME", "Nicholas Sparks", true);
        BookList book4 = new BookList(4, "A GAME OF THRONES", "George R. R. Martin", true);

        books.add(book1);
        books.add(book2);
        books.add(book3);
        books.add(book4);
    }

    public void addMovies() {
        MovieList movie1 = new MovieList(1, "A Good Day to Die Hard ", 2013, "John Moore", 8.5);
        MovieList movie2 = new MovieList(2, "Man of Steel", 2013, "Zack Snyder", null);
        MovieList movie3 = new MovieList(3, "The American President", 1995, "Rob Reiner", 7.0);
        MovieList movie4 = new MovieList(4, "Ghostbusters", 1984, "Ivan Reitman", 8.0);
        MovieList movie5 = new MovieList(5, "Star Wars", 1977, "George Lucas", 7.2);
        MovieList movie6 = new MovieList(6, "I Am Legend", 2007, "Francis Lawrence", 6.5);
        MovieList movie7 = new MovieList(7, "Batman Begins", 2005, "Christopher Nolan", null);
        MovieList movie8 = new MovieList(8, "Spiderman", 2002, "Sam Raimi", 7.0);
        MovieList movie9 = new MovieList(9, "Twister", 1996, "Jan de Bont", null);
        MovieList movie10 = new MovieList(10, "Forrest Gump", 1984, "Robert Zemeckis", 8.1);
        MovieList movie11 = new MovieList(11, "Jaws", 1975, "Steven Spielberg", null);
        MovieList movie12 = new MovieList(12, "Fast & Furious 6", 2013, "Justin Lin", 8.5);
        MovieList movie13 = new MovieList(13, "Oblivion", 2013, "Joseph Kosinski", null);
        MovieList movie14 = new MovieList(14, "Inception", 2010, "Christopher Nolan", 8.4);
        MovieList movie15 = new MovieList(15, "Toy Story 3", 2010, "Lee Unkrich", 9.0);

        movies.add(movie1);
        movies.add(movie2);
        movies.add(movie3);
        movies.add(movie4);
        movies.add(movie5);
        movies.add(movie6);
        movies.add(movie7);
        movies.add(movie8);
        movies.add(movie9);
        movies.add(movie10);
        movies.add(movie11);
        movies.add(movie12);
        movies.add(movie13);
        movies.add(movie14);
        movies.add(movie15);
    }

    public void addUsers() {
        UserList user1 = new UserList(1, "Gislene Pereira", "111-1111", "111", "111-1111@gmail.com", "7133334444");
        UserList user2 = new UserList(2, "Lielson Junior", "222-2222", "222", "222-2222@gmail.com", "8122223333");
        UserList user3 = new UserList(3, "João Pedro", "333-3333", "333", "333-3333@gmail.com", "8133334444");

        users.add(user1);
        users.add(user2);
        users.add(user3);
    }
}
